#pragma once

#include <vector>
#include "vec3.h"
#include "mat3.h"
#include "mat4.h"
#include "Camera.h"
#include "Model.h"
#include "SmartPtr.h"
#include "Color.h"

using std::vector;

class IRenderer;
typedef SmartPtr<IRenderer> RendererPtr;

class IRenderer
{
public:
	virtual void resize() = 0;

	// called on new frame begin
	virtual void startScene() = 0;

	// called on new frame end (presents all drawn data to screen)
	virtual void endScene() = 0;

	// set the model world transformation
	virtual void setModelTransform(const Mat4& m) = 0;

	// draw a single pixel
	virtual void drawPixel(int x, int y, int argb = WHITE) = 0;

	// draw a single line
	virtual void drawLine(const Vec3& v1, const Vec3& v2, int argb = WHITE) = 0;

	// draw a single triangle
	virtual void drawTriangle(const Vec3& v1, const Vec3& v2, const Vec3& v3) = 0;

	// set the current camera for transform and projection calculations
	virtual void setCamera(CameraPtr camera) = 0;
};
